<!--
 * @Author: liyin 2179253556@qq.com
 * @Date: 2022-08-31 08:14:44
 * @LastEditors: liyin 2179253556@qq.com
 * @LastEditTime: 2023-03-15 09:57:03
 * @FilePath: \school-history-museum\src\App.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div class="app">
    <transition name="fade" mode="in-out">
      <router-view></router-view>
    </transition>
  </div>
</template>
<script>
export default {
  data() {
    return {}
  },
  methods: {},
  created() {
  },
  async mounted() {
    document.documentElement.webkitRequestFullScreen()
    // 禁止双指方法
    document.documentElement.addEventListener(
      'touchstart',
      function (event) {
        if (event.touches.length > 1) {
          event.preventDefault()
        }
      },
      false
    )
    // 禁止双击放大
    var lastTouchEnd = 0
    document.documentElement.addEventListener(
      'touchend',
      function (event) {
        var now = Date.now()
        if (now - lastTouchEnd <= 300) {
          event.preventDefault()
        }
        lastTouchEnd = now
      },
      false
    )
  }
}
</script>
<style>
.app {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
</style>
